package main

import (
	"com.yy.api/agent/config"
	"com.yy.api/agent/lib/api"
	"com.yy.api/common/logger"
	"net"
	"net/http"
	"net/rpc"
)

func main() {
	agent := api.NewAgent()
	rpc.Register(&agent)
	rpc.HandleHTTP()
	l, e := net.Listen("tcp", config.AppPort)
	if e != nil {
		logger.Default.Errorf("rpc服务启动失败", e)
	}
	logger.Default.Infof("podmanAgent服务启动成功,监听端口%s", config.AppPort)
	http.Serve(l, nil)
}
